/*
Borealis Library
A library of commonly used hydrological modeling building blocks

Copyright (C) 2008  Chris Marsh

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AURORA_H
#define AURORA_H

#ifdef _DEBUG
	#define AURORA_DEBUG
#else
	#define AURORA_RELEASE
#endif

//only include the debug libraries
#ifdef AURORA_DEBUG
	#pragma comment(lib,"libconfig++_debug.lib")
// 	#pragma comment(lib,"tbb_debug.lib")
	#define ENABLE_LOGGING 1
#else ifdef AURORA_RELEASE
	#pragma comment(lib,"libconfig++.lib")
// 	#pragma comment(lib,"tbb.lib")
#endif

#include <libconfig\libconfig.hpp>

#include <tbb\concurrent_queue.h>
#include <tbb\concurrent_vector.h>
#include <tbb\concurrent_hash_map.h>

#include <boost\tuple\tuple.hpp>
#include <boost\lexical_cast.hpp>
#include <boost\noncopyable.hpp>
#include <boost\shared_ptr.hpp>

#include <string>
#include <vector>


#include "AuroraTypes.hpp"
#include "ModuleFactory.hpp"

namespace Aurora
{
	// Used to compare the hashes of the main data structure
	//not case sensitive

	class Aurora
	{
	public:
		void OpenProject(std::string file);
		void Run();
		Aurora();
		~Aurora();

		
													//In vars					outvars					Module
		typedef tbb::concurrent_vector<AuroraTypes::Module > ModuleList;
		typedef tbb::concurrent_queue<AuroraTypes::Module > RunOnceModuleList;
	private:

		AuroraTypes::StationList*  m_obs;
		AuroraTypes::VariableList* m_variables;
		boost::shared_ptr<Borealis::AsciiRaster>  m_raster;
		boost::shared_ptr<Borealis::AsciiRaster>  m_slope;
		boost::shared_ptr<Borealis::AsciiRaster>  m_aspect;
											
		ModuleList m_moduleList;
		//same as above, but these modules are ones that need only be run once before dropping into the main loop
		RunOnceModuleList m_runOnceModuleList;
	};
}

#endif